fix: add Vercel deploy config and workflow for docs site#1739
Conversation
The Vercel docs site at headroom-docs.vercel.app had no automated deployment pipeline, so newly added pages (persistent-installs, savings) return 404 despite existing in the repo and building correctly locally. - Add docs/vercel.json with explicit Next.js project config - Add deploy-vercel job to docs.yml to auto-deploy on pushes to main touching docs/ Closes headroomlabs-ai#1730
PR governanceThis PR does not yet satisfy the required template fields:
Please update the PR body, or move the PR back to draft while it is still in progress. |
JerrettDavis
left a comment
There was a problem hiding this comment.
This needs one deployment-shape fix before it is safe to merge.
The new job runs npx vercel deploy --prod with working-directory: docs, and docs/vercel.json tells Vercel to install/build that project. But docs/package.json depends on the local TypeScript SDK as "headroom-ai": "file:../sdk/typescript", and docs/package-lock.json records that as a link to ../sdk/typescript. If the Vercel project upload/build root is docs, that parent directory is outside the deployment context, so the remote install/build can fail even though cd docs && npm ci && npm run build works in a full local checkout.
Please adjust the workflow/config so the Vercel deployment has access to the monorepo dependency it needs. For example, deploy with the repository root as the uploaded context while configuring the Vercel project/root directory as docs, or change the docs dependency/build path so it does not rely on ../sdk/typescript during Vercel’s remote install. Once that is fixed, the workflow should also validate the same Next/Fumadocs build path it deploys, not only the legacy mkdocs job.
Description
The Vercel docs site at headroom-docs.vercel.app had no automated deployment pipeline, so newly added pages (persistent-installs, savings) return 404 despite existing in the repo and building correctly locally.
Closes #1730
Type of Change
Changes Made
Testing
Test Output
Real Behavior Proof
Review Readiness
Additional Notes
Requires three repo secrets: VERCEL_TOKEN, VERCEL_ORG_ID, VERCEL_PROJECT_ID.